package cn.wolfcode.service.impl;

import cn.wolfcode.domain.EmployeeNotice;
import cn.wolfcode.mapper.EmployeeNoticeMapper;
import cn.wolfcode.qo.QueryObject;
import cn.wolfcode.service.IEmployeeNoticeService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeNoticeServiceImpl implements IEmployeeNoticeService {

    @Autowired
    private EmployeeNoticeMapper employeeNoticeMapper;


    @Override
    public void save(EmployeeNotice employeeNotice) {
        employeeNoticeMapper.insert(employeeNotice);
    }

    @Override
    public void delete(Long id) {
        employeeNoticeMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void update(EmployeeNotice employeeNotice) {

    }

    @Override
    public EmployeeNotice get(Long id) {
        return null;
    }


    @Override
    public List<EmployeeNotice> listAll() {
        return employeeNoticeMapper.selectAll();
    }

    @Override
    public PageInfo<EmployeeNotice> query(QueryObject qo) {
        return null;
    }


    @Override
    public List<EmployeeNotice> selectStatus(Long id) {
        return employeeNoticeMapper.selectStatus(id);
    }

    @Override
    public void updateReadStatus(Long userId, Long noticeId) {
        employeeNoticeMapper.updateReadStatus(userId,noticeId);
    }


}
